package com.xsf.jieyou.commons.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户日志实体类。
 *
 * @author xsf
 * @version v1.0.0
 * @date 2019/12/22 0022
 * @see com.xsf.jieyou.commons.entity
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserLog implements Serializable {

    private static final long serialVersionUID = -2099686143363910507L;
    /**
     * 主键
     */
    private Long id;

    /**
     * 用户主键
     */
    private Long userId;

    /**
     * 访问者IP
     */
    private String ip;

    /**
     * 访问人所在地址
     */
    private String address;

    /**
     * 浏览器登录类型
     */
    private String userAgent;

    /**
     * 备注
     */
    private String note;

    /**
     * 日志创建时间
     */
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}